package com.simple.elpmobile.onlinecase.ui;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.simple.elpmobile.onlinecase.R;
import com.simple.elpmobile.onlinecase.ui.base.BaseActivity;

public class SplashActivity extends BaseActivity
{
	
	private final static int MSG_MAIN = 0;
	private final static int MSG_LOGIN =1;
	private Handler mHandler = new Handler(){
		@Override
		public void handleMessage(Message msg){
			switch(msg.what)
			{
				case MSG_MAIN:
				{
					gotoMain();
					break;
				}
				case MSG_LOGIN:
				{
					break;
				}
			}
		}
	};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash);
		
		mHandler.sendEmptyMessageDelayed(MSG_MAIN, 2*1000);
		
	}
	
	
	private void gotoMain(){
		Intent intent = new Intent(this,LoginActivity.class);
		startActivity(intent);
		this.finish();
	}
	
	@Override
	public byte activityId() {
		// TODO Auto-generated method stub
		return SPLASH_ID;
	}
	
	

}